<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="java.util.*" %>
<%@ page import="jpa.*" %>
<%@ page import="javax.naming.*" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<%
IStatelessBean stateless = (IStatelessBean)session.getAttribute("sessionBean");
IStatefulBean stateful = (IStatefulBean)session.getAttribute("statefulBean");
%>

<h2>Caches</h2>
<%
	List<Cache> caches = null;
	List<Member> members = null;
	List<Header> headers = null;
	Cache curCat = null;
	caches = stateless.getAllCaches();
	members = stateless.getAllMembers();
	headers = stateless.getAllHeaders();
    
    
	if (caches != null)
	{
		for (Cache c : caches)
		{
%>
					<ul>
						<li>Name: <%=c.getCacheName() %></li>
						<li>ID: <%=c.getCacheId() %></li>
						<li>Latitude: <%=c.getCacheLatitude() %></li>
						<li>Long: <%=c.getCacheLongitude() %></li>
						<li>PicURL: <%=c.getCachePicurl() %></li>
						<li>Approved: <%=c.getCacheApproved() %></li>
						<li>Description: <%=c.getCacheDescription() %></li>
					</ul>
					
<%
			
		}
	}
%>
<h2>Members</h2>
<%
if (members != null)
	{
		for (Member m : members)
		{
%>
					<ul>
						<li>Name:  <%= m.getMemName()%></li>
						<li>ID:    <%= m.getMemId()%></li>
						<li>Pass:  <%= m.getMemPass()%></li>
						<li>Email: <%= m.getMemEmail()%></li>
						<li>Admin: <%= m.getMemAdmin()%></li>
					</ul>
					
<%
		}
	}
%>
<h2>Headers</h2>
<%
	if (headers != null)
	{
		for (Header h: headers)
		{
%>
				<ul>
					<li>Title:  <%=h.getHeadTitle()%></li>
					<li>ID:     <%=h.getHeadId()%></li>
					<li>PicURL: <%=h.getHeadPicurl()%></li>
					<li>Description: <%=h.getHeadDescription()%></li>
				</ul>
				
<%
		}
	}
%>
	


</body>
</html>